package com.sample.tdf.domain;

import cn.com.taiji.common.base.BaseDomain;
import cn.com.taiji.common.base.BaseTreeDomain;
import cn.com.taiji.common.util.CommonJpaQueryWord;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Where;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 组织机构表
 **/
@Data
@NoArgsConstructor
@Entity
@Table(name = "organization")
@Where(clause = "flag=1")
public class Organization extends BaseTreeDomain {
    private static final long serialVersionUID = 7578292815541249813L;

    /*
     父级id
     */
    private String parentId;

    /*
     路径
     */
    private String path;

    /*
     机构名称
     */
    @CommonJpaQueryWord(func = CommonJpaQueryWord.MatchType.like)
    private String name;

    /*
     机构位置
     */
    @CommonJpaQueryWord(func = CommonJpaQueryWord.MatchType.like)
    private String location;
}
